local WaitNormalLayer = class("WaitNormalLayer", require "widget/BaseUI")
 
function WaitNormalLayer.show()
    print("============WaitNormalLayer.show===============")
 
    local win = WaitNormalLayer.new()

    local data = getWndInitParamList()
    data.isRemoveResource = false
    data.imgTitle = nil
    data.bgImage = nil
    data.isShowCover = false,

    win:init(data)
    win:showWindow()

    return win

end

function WaitNormalLayer:ctor() 
    WaitNormalLayer.super:ctor();
end


function WaitNormalLayer:init(data)
    self:initWithParas(data)
    
    self.m_Json = ccs.GUIReader:getInstance():widgetFromJsonFile("image/ui/Json/LayerWait_Normal.json")
    self.m_Json:setPositionX(-WinSize.width/2)
    self.m_Json:setPositionY(-WinSize.height/2) 
    local WinSize = cc.Director:getInstance():getWinSize()
    self.m_Json:setScaleX(WinSize.width/self.m_Json:getContentSize().width)
    self.m_Json:setScaleY(WinSize.height/self.m_Json:getContentSize().height)
  
 
    self:addChild(self.m_Json)
    
    self.m_LabelHaHa = self.m_Json:getChildByName("Label_HaHa")
    self.m_ImageView = self.m_Json:getChildByName("cs_bg")
    self.m_LabelConfig = self.m_Json:getChildByName("Label_Config")
    self.m_BtnCancel = self.m_Json:getChildByName("bt_Cancel")
    self.m_BtnCancel:setTouchEnabled(true)
    self.m_BtnCancel:addTouchEventListener(function(sender,eventType)self:onMenutClick(sender,eventType) end)
    self.m_Panel = self.m_Json:getChildByName("Panel")
  
end


function WaitNormalLayer:onMenutClick(sender,eventType)
    if eventType == ccui.TouchEventType.ended then
        if sender == self.m_BtnCancel then     
            print "=========WaitNormalLayer:onMenutClick m_BtnCancel======================="
            self:closeWindow()
        end
    end
end
 
return WaitNormalLayer